/*
 * SpeedLabelAndSliderSynchronizator.hpp
 *
 *  Created on: 05-01-2011
 *      Author: Przemek
 */

#pragma once

#include "gui/MouseListener.hpp"
#include "gui/Label.hpp"
#include "gui/Slider.hpp"

/*
 * Sets the label value to text 'x' concatenated with the value of a slider. Used for showing the world's
 * time speed multiplication.
 */
class SpeedLabelAndSliderSynchronizator: public MouseListener
{
	private:
		Label* label;
		const Slider* slider;

	public:
		SpeedLabelAndSliderSynchronizator(Label* label, const Slider* slider);

		void mouseReleased(const MouseListener::EventArguments& arguments);
		void mouseDragged(const MouseListener::EventArguments& arguments);

	private:
		void synchronize();
};
